package base.day06;

import java.util.Scanner;

public class Study1 {
    public static void main(String[] args) {
        //判断三个数的大小
        Scanner sc = new Scanner(System.in);
        System.out.println("输入第一个数：");
        int number1 = sc.nextInt();
        Scanner sc2 = new Scanner(System.in);
        System.out.println("输入第二个数");
        int number2 = sc.nextInt();
        System.out.println("输入第三个数");
        Scanner sc3 = new Scanner(System.in);
        int number3 = sc3.nextInt();
        //调用方法
        System.out.println("最大的数是" + getMax(number1, number2, number3));
    }

    public static int getMax(int number1, int number2, int number3) {
        int c;
        if (number1 > number2) {
            if (number1 > number3) {
                return number1;
            } else {
                return number3;
            }
        } else {
            if (number2 > number3) {
                return number2;
            } else {
                return number3;
            }
        }
    }
}
